---
import { ViewTransitions } from 'astro:transitions'

import Sidebar from '../components/Sidebar.astro'
import Footer from '../components/Footer.astro'
import BackToTop from '../components/BackToTop.astro'

import '@fontsource-variable/nunito/index.css'
import '@fontsource/material-icons/index.css'
import '@fontsource-variable/roboto-flex/index.css'

import 'simplebar/dist/simplebar.min.css'
import '../styles/main.scss'
const { title } = Astro.props
---

<!doctype html>
<html dir="ltr" lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <meta http-equiv="X-UA-Compatible" content="ie=edge" />
    <title>Fresh {'- ' + title}</title>
    <ViewTransitions />

    <!-- Google Tag Manager -->
    <script>
      ;(function (w, d, s, l, i) {
        w[l] = w[l] || []
        w[l].push({ 'gtm.start': new Date().getTime(), event: 'gtm.js' })
        var f = d.getElementsByTagName(s)[0],
          j = d.createElement(s),
          dl = l != 'dataLayer' ? '&l=' + l : ''
        //@ts-ignore
        j.async = true
        //@ts-ignore
        j.src = 'https://www.googletagmanager.com/gtm.js?id=' + i + dl
        f.parentNode.insertBefore(j, f)
      })(window, document, 'script', 'dataLayer', 'GTM-PV65Z24')
    </script>
    <!-- End Google Tag Manager -->

    <link rel="icon" type="image/png" href="img/favicon.png" />
  </head>

  <body>
    <!-- Google Tag Manager (noscript) -->
    <noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-PV65Z24" height="0" width="0" style="display:none;visibility:hidden"></iframe> </noscript>
    <!-- End Google Tag Manager (noscript) -->

    <Sidebar />

    <!--page partial-->
    <slot />

    <Footer />

    <!--Back to top-->
    <BackToTop />

    <script src="../js/main"></script>
  </body>
</html>
